package com.sh.数据类型等;

public class Test2 {
    public static void main(String[] args) {
        // 总结  会被四舍五入取整
        long round1 = Math.round(-1.5);
        long round2 = Math.round(-1.7);
        long round3 = Math.round(1.3);
        long round4 = Math.round(1.7);
        long round5 = Math.round(1.5);
        System.out.println(round1);
        System.out.println(round2);
        System.out.println(round3);
        System.out.println(round4);
        System.out.println(round5);
    }
}
